// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//使用element-ui
import eleUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/reset.css'
Vue.use(eleUI,{ size: 'medium', zIndex: 3000 });

//引入nprogress
import NProgress from 'nprogress'
import 'nprogress/nprogress.css' 


//关闭控制台多余提示
Vue.config.productionTip = false;


// 简单配置
NProgress.inc(0.2)
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false })
 
 
router.beforeEach((to,from,next) => {
  NProgress.start()
  next()
})
 
router.afterEach(() => {
  NProgress.done()
})

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

